package com.hy.study.demo.complexquerydemo.bean.view;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.Set;

/**
 * 组织结构查询参数DTO
 */

public class OrganizationQueryDTO {
    private String chineseAbbrName;

    private String chineseFullName;

    private String englishAbbrName;

    private String englishFullName;

    private String groupUnifiedUnitCode;

    private String organizationCode;

    private String registeredFullName;

    private String socialCreditIdentifier;
    /**
     * 查询条件组合
     */
    private Set<QueryCombinationCondition> queryCombinationConditions;

    public String getChineseAbbrName() {
        return chineseAbbrName;
    }

    public void setChineseAbbrName(String chineseAbbrName) {
        this.chineseAbbrName = chineseAbbrName;
    }

    public String getChineseFullName() {
        return chineseFullName;
    }

    public void setChineseFullName(String chineseFullName) {
        this.chineseFullName = chineseFullName;
    }

    public String getEnglishAbbrName() {
        return englishAbbrName;
    }

    public void setEnglishAbbrName(String englishAbbrName) {
        this.englishAbbrName = englishAbbrName;
    }

    public String getEnglishFullName() {
        return englishFullName;
    }

    public void setEnglishFullName(String englishFullName) {
        this.englishFullName = englishFullName;
    }

    public String getGroupUnifiedUnitCode() {
        return groupUnifiedUnitCode;
    }

    public void setGroupUnifiedUnitCode(String groupUnifiedUnitCode) {
        this.groupUnifiedUnitCode = groupUnifiedUnitCode;
    }

    public String getOrganizationCode() {
        return organizationCode;
    }

    public void setOrganizationCode(String organizationCode) {
        this.organizationCode = organizationCode;
    }

    public String getRegisteredFullName() {
        return registeredFullName;
    }

    public void setRegisteredFullName(String registeredFullName) {
        this.registeredFullName = registeredFullName;
    }

    public String getSocialCreditIdentifier() {
        return socialCreditIdentifier;
    }

    public void setSocialCreditIdentifier(String socialCreditIdentifier) {
        this.socialCreditIdentifier = socialCreditIdentifier;
    }

    public Set<QueryCombinationCondition> getQueryCombinationConditions() {
        return queryCombinationConditions;
    }

    public void setQueryCombinationConditions(Set<QueryCombinationCondition> queryCombinationConditions) {
        this.queryCombinationConditions = queryCombinationConditions;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
            return null;
        }
    }
}
